#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>

int main()
{
	int b[10] = { 0 };
	char a[] = { 0 };
	char* p = a;
	int digit = 0;
	int i = 0;
	gets(a);
	for (; *p != '\0'; p++)
		if ((*p >= '0' && *p <= '9') && (*(p + 1) >= '0' && *(p + 1) <= '9'))
		{
			digit = digit + *p - 48;
				p++;
				for (; *p >= '0' && *p <= '9'; p++)
					digit = digit * 10 + *p-48;
				b[i] = digit;
				i++;
				digit = 0;
		}
	printf("%d\n", i );
	for (int j = 0; j < i; j++)
		printf("%d ", b[j]);

	return 0;

	 
}